<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php 

include('system/db/conn.php');
	$idNum = $_GET['id'];
	//print_r($idNum);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php if ($idNum==20 ){?>关于我们<?php }elseif ($idNum ==31){?>诚招英才<?php }elseif ($idNum==29){?>免责条款 <?php }elseif ($idNum==27){?>员工月计划<?php }elseif ($idNum==30){?>合作商谈<?php }?></title>
<link href="style/css.css" rel="stylesheet" type="text/css"><script
	type="text/javascript" src="js/jquery-1.9.0.min.js"></script> <script
	src="js/jquery.blockUI.js" type="text/javascript"></script> <script
	type="text/javascript">
var sendPhone="";
function phoneCheck(){

var yanzhengma=$("#yanzhengma").val();
//
if(yanzhengma==""){
    alert("请输入验证码!");
  }else{
    $.ajax({ 
    type:'post', //传送的方式,get/post 
    url:'phonecheckAjax.php', //发送数据的地址 
    cache:'true',  
    data:'phonecheck='+yanzhengma,
    datatype:"text",
    success:function(data) 
    { 
      
     if(data=="yes"){
      
     	 $.ajax({ 
    type:'post', //传送的方式,get/post 
    url:'sendupdatePass.php', //发送数据的地址 
    cache:'true',  
    data:'phonecheck=2',
    datatype:"text",
    success:function(data) 
    { 
    	var hi=data.split(",");
    	if(hi[0]=="yes"){

		$.ajax({ 
               type:'post', //传送的方式,get/post 
               url:'post_mt1.php', //发送数据的地址 
               cache:'false', 
               data:'name='+sendPhone+"&sendValue="+"您的重置密码为:"+hi[1],  
              success:function(data) 
                { 
      
                }
            });
    		alert("成功重置，密码会以短信形式发送给您");
    	}else if(hi[1]=="no"){
    		alert("重置密码失败");
    	}

    } 
  }); 
     }else if(data=="no"){
     alert("验证码错误");

     }else{
      alert("验证码错误");
     }
    } 
  }); 

  }
}
var wait=60;

function time(o) {
        if (wait == 0) {
            o.removeAttribute("disabled");           
            o.value="发送验证码";
            wait = 60;
            o.className="resend-a";
        } else {
         o.className="resend-a2";
            o.setAttribute("disabled", true);
            o.value="重新发送(" + wait + ")";
            wait--;
            setTimeout(function() {
                time(o)
            },
            1000)
        }
}
function sendSMS() //点击提交留言ajax显示
{ 
  
  var zhanghao=$("#userzhanghao").val();

  $.ajax({ 
    type:'post', //传送的方式,get/post 
    url:'getUsername.php', //发送数据的地址 
    cache:'false', 
    data:'zhanghao='+zhanghao, 
    datatype:"text",
    success:function(data) 
    { 
      var hi=data.split(",");
      if(hi[0]=="success"){
      	sendPhone=hi[1];
        $.ajax({ 
               type:'post', //传送的方式,get/post 
               url:'post_mt.php', //发送数据的地址 
               cache:'false', 
               data:'name='+hi[1], 
              success:function(data) 
                { 
      				
                }
            })

      }else{

        alert("该账号不存在");
      }

    }
  });
/*   */
  time(document.getElementById("reSend"));
} 
function forgetPass(){
   //给box_btn绑定一个鼠标点击的事件
  $.blockUI({    //当点击事件发生时调用弹出层
    message: $('#loginbox3'),    //要弹出的元素box
    css: {    //弹出元素的CSS属性
      border:'5px solid #334343',
      textAlign: 'left',
    width: '490px',
    top:  ($(window).height() - 290) /2 + 'px', 
      left: ($(window).width() - 490) /2 + 'px', 
    cursor: 'auto'
         },
    overlayCSS: {
    opacity: '0.7' 
              }
   });
  $('.blockOverlay').attr('title','单击关闭').click($.unblockUI);   //遮罩层属性的设置以及当鼠标单击遮罩层可以关闭弹出层
  $('.close').click($.unblockUI);  //也可以自定义一个关闭按钮来关闭弹出层
}
$(function(){ 
//Default Action 
$(".tab_content").hide(); //Hide all content 
$("ul.tabs li:first").addClass("active").show(); //Activate first tab 
$(".tab_content:first").show(); //Show first tab content 
//On Click Event 
$("ul.tabs li").click(function() { 
$("ul.tabs li").removeClass("active"); //Remove any "active" class 
$(this).addClass("active"); //Add "active" class to selected tab 
$(".tab_content").hide(); //Hide all tab content 
var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content 
$(activeTab).fadeIn(); //Fade in the active content 
return false; 
}); 
}); 
</script> <script type="text/javascript"> 
$(function(){

var mimacheck=$("#mimacheck").val();
  if(mimacheck==1){
       //给box_btn绑定一个鼠标点击的事件
  $.blockUI({    //当点击事件发生时调用弹出层
    message: $('#loginbox'),    //要弹出的元素box
    css: {    //弹出元素的CSS属性
      border:'5px solid #334343',
      textAlign: 'left',
    width: '490px',
    top:  ($(window).height() - 290) /2 + 'px', 
      left: ($(window).width() - 490) /2 + 'px', 
    cursor: 'auto'
         },
    overlayCSS: {
    opacity: '0.7' 
              }
   });
  $('.blockOverlay').attr('title','单击关闭').click($.unblockUI);   //遮罩层属性的设置以及当鼠标单击遮罩层可以关闭弹出层
  $('.close').click($.unblockUI);  //也可以自定义一个关闭按钮来关闭弹出层


  $("#passerrorShow").css("display","block");
  }


var mimacheck1=$("#mimacheck1").val();
  if(mimacheck1==1){
       //给box_btn绑定一个鼠标点击的事件
  $.blockUI({    //当点击事件发生时调用弹出层
    message: $('#loginbox1'),    //要弹出的元素box
    css: {    //弹出元素的CSS属性
      border:'5px solid #334343',
      textAlign: 'left',
    width: '490px',
    top:  ($(window).height() - 290) /2 + 'px', 
      left: ($(window).width() - 490) /2 + 'px', 
    cursor: 'auto'
         },
    overlayCSS: {
    opacity: '0.7' 
              }
   });
  $('.blockOverlay').attr('title','单击关闭').click($.unblockUI);   //遮罩层属性的设置以及当鼠标单击遮罩层可以关闭弹出层
  $('.close').click($.unblockUI);  //也可以自定义一个关闭按钮来关闭弹出层


  $("#passerrorShow1").css("display","block");
  }

 $('#login').click(function(){   //给box_btn绑定一个鼠标点击的事件
  $.blockUI({    //当点击事件发生时调用弹出层
    message: $('#loginbox'),    //要弹出的元素box
    css: {    //弹出元素的CSS属性
      border:'5px solid #334343',
      textAlign: 'left',
  	width: '490px',
  	top:  ($(window).height() - 290) /2 + 'px', 
      left: ($(window).width() - 490) /2 + 'px', 
  	cursor: 'auto'
         },
    overlayCSS: {
  	opacity: '0.7' 
  	          }
   });
  $('.blockOverlay').attr('title','单击关闭').click($.unblockUI);   //遮罩层属性的设置以及当鼠标单击遮罩层可以关闭弹出层
  $('.close').click($.unblockUI);  //也可以自定义一个关闭按钮来关闭弹出层
/*  $("#alllogin").attr("action","login.php");*/

  });

  
$('#shoplogin').click(function(){   //给box_btn绑定一个鼠标点击的事件
  $.blockUI({    //当点击事件发生时调用弹出层
    message: $('#loginbox1'),    //要弹出的元素box
    css: {    //弹出元素的CSS属性
      border:'5px solid #334343',
      textAlign: 'left',
    width: '490px',
    top:  ($(window).height() - 290) /2 + 'px', 
      left: ($(window).width() - 490) /2 + 'px', 
    cursor: 'auto'
         },
    overlayCSS: {
    opacity: '0.7' 
              }
   });
  $('.blockOverlay').attr('title','单击关闭').click($.unblockUI);   //遮罩层属性的设置以及当鼠标单击遮罩层可以关闭弹出层
  $('.close').click($.unblockUI);  //也可以自定义一个关闭按钮来关闭弹出层
  // $("#alllogin").attr("action","login-shop.php");
  });

});

function InputCheck(LoginForm)
{
  if (LoginForm.username.value == "")
  {
    alert("请输入用户名!");
    LoginForm.username.focus();
    return (false);
  }
  if (LoginForm.password.value == "")
  {
    alert("请输入密码!");
    LoginForm.password.focus();
    return (false);
  }
}
</script>

</head>

<body>

<div id="loginbox" style="display:none">
<form name="LoginForm" method="post" id="alllogin" action="login.php" onSubmit="return InputCheck(this)">
  <div class="login_title">会员登录</div>
  <div class="login_input">
    <div class="input"><span>账号：</span><span><input name="username" type="text" /></span></div>
    <div class="input"><span>密码：</span><span><input name="password" type="password" /></span></div>
    <input name="headeraction" type="hidden" value="index" />
    <div class="login_input_1 clearfix"><input name="" type="checkbox" value="" id="store1" /><label for="store1">自动登录</label><a onclick="forgetPass()" href="javascript:void(0)">找回密码</a><span style="color:red;display:none" id="passerrorShow" >&nbsp;&nbsp;账号或密码错误</span></div>
    <div class="reg clearfix"><span><input class="login_btn" name="submit" type="image" src="images/login.jpg" /></span><span>还没有账号？</span><a href="reg11.php">立即注册</a></div>
  </div>
</form>
</div>
<div id="loginbox1" style="display:none">
<form name="LoginForm" method="post" id="alllogin1" action="login-shop.php" onSubmit="return InputCheck(this)">
  <div class="login_title">店铺登录</div>
  <div class="login_input">
    <div class="input"><span>账号：</span><span><input name="username" type="text" /></span></div>
    <div class="input"><span>密码：</span><span><input name="password" type="password" /></span></div>
    <div class="reg clearfix"><span><input class="login_btn" name="submit" type="image" src="images/login.jpg" /></span><span style="color:red;display:none" id="passerrorShow1" >&nbsp;&nbsp;账号或密码错误</span></div>
  </div>
</form>
</div>
<div id="loginbox3" style="display:none">
  <div class="login_title">忘记密码</div>
  <div class="login_input">
    <div class="inputb"><span>账号：</span><span><input  name="username" id="userzhanghao" type="text" /></span></div>
    <div class="inputc"><span></span><span><input style="width:98px;height:22px;color: #336666;
    font-size: 12px;
    
    line-height: 32px;" id="reSend" value="发送验证码" onclick="sendSMS()" name="password" type="button" /></span></div>
     <div class="inputa"><span>验证码：</span><span><input style="width:98px;" id="yanzhengma" name="password" type="password" /></span></div>
    <div class="reg clearfix"><span><input class="" onclick="phoneCheck()" type="image" src="images/login.jpg" /></span></div>
  </div>
</div>

<div class="top">
  <div class="top_content clearfix"><span class="left"><a href="index.php">欢迎来到外卖网365！</a></span><span class="right">
 
  <?php
    if(isset($_SESSION['username'])){
      if($_SESSION['logintype']=="userlog"){
     echo '<a href="member.php">'.$_SESSION['username'],'欢迎你！</a>';
}elseif ($_SESSION['logintype']=="supplierlog") {
   echo '<a href="shop-xx.php">'.$_SESSION['username'],'欢迎你！</a>';
}
      echo '<a href="login.php?action=logout">登出</a>';
    }else{
    	echo ' <a href="#" id="login">';
      echo '登录';
      echo '</a> / <a href="reg11.php">注册</a>';
    }
  ?>
  <?php  
      if(!isset($_SESSION['username'])  ){
   ?>
  | <a href="#"  id="shoplogin">店铺登录</a></span></div>
  <?php 
    }

   ?>
</div>

<div class="content clearfix">
<div class="content_logo"><img src="images/logo.png"></div>
<div class="content_con clearfix">

<div class="content_con_left left">
<div class="guide">
<div class="guide_title"><a href="aboutAction.php?id=20">关于我们</a></div>
<div class="guide_title"><a href="aboutAction.php?id=31">诚招英才</a></div>
<div class="guide_title"><a href="aboutAction.php?id=30">合作商谈</a></div>
<div class="guide_title"><a href="aboutAction.php?id=29">免责条款</a></div>
<div class="guide_title"><a href="aboutAction.php?id=27">员工月计划</a></div>
</div>
</div>

<div class="content_con_right right">
<ul class="tabs">
	<li><a href="#tab1"><?php if ($idNum==20 ){?>关于我们<?php }elseif ($idNum ==31){?>诚招英才<?php }elseif ($idNum==29){?>免责条款 <?php }elseif ($idNum==27){?>员工月计划<?php }elseif ($idNum==30){?>合作商谈<?php }?></a></li>

</ul>
<div class="tab_container clearfix">
	<ul id="tab1" class="tab_content clearfix">
	
	<?php 
		
	  		$qq = mysql_query("SELECT * from do_article where id=".$idNum);
          while($row = mysql_fetch_array($qq)){
          	
	
	?>
		<?php echo $row['content']?>
		
		<?php }?>
	</ul>
</div>
</div>
</div>
</div>

<?php include('bottom.php') ?>
</body>
</html>
